package leetcode91_100;

import outoforder.leetcode.TreeNode;

/**
 * @author shhjiang_001
 * @create 2020-07-08 16:43
 */
public class Solution100 {
    public boolean isSameTree(TreeNode p, TreeNode q) {
        if (p == null && q == null) return true;
        if (p == null || q == null) return false;
        if (p.val != q.val) return false;
        return isSameTree(p.left,q.left) && isSameTree(p.right,q.right);
    }
}
